import request from '@/utils/request'

// 添加全球
export function addCron(data) {
    return request({
        url: '/system/cron',
        method: 'POST',
        data: data
    })
}
//删除
export function deleteCron(id) {
    return request({
        url: '/system/cron/' + id,
        method: 'DELETE',

    })
}
//获取列表
export function getCronList() {
    return request({
        url: '/system/cron/list',
        method: 'GET',

    })
}
//执行

export function getCronExec(data) {
    return request({
        url: '/system/cron/exec',
        method: 'GET',
        params: data
    })
}
//查看

export function getCronCatLog(data) {
    return request({
        url: '/system/cron/catLog',
        method: 'GET',
        params: data
    })
}
//删除log文件
export function delCronLog(data) {
    return request({
        url: '/system/cron/deleteLog',
        method: 'GET',
        params: data
    })
}   
//刷新

export function getCronRefresh(data) {
    return request({
        url: '/system/cron/refresh',
        method: 'GET',
        params: data

    })
}
//pdf 下载
export function getCronPdf(data) {
    return request({
        url: '/common/download/resource',
        method: 'GET',
        params: data,
        responseType: 'blob'
    })
}